home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ShareWare OnLine 2
/
ShareWare OnLine Volume 2 (CMS Software)(1993).iso
/
hobby
/
sbs201.zip
/
BASEBALL.DOC
< prev
next >
Wrap
Text File
|
1993-03-22
|
30KB
|
667 lines
STRATEGIC BASEBALL SIMULATOR
Copyright 1988 David B. Schmidt
(SBS)
Version 2.0
February 1993
Page 1
TABLE OF CONTENTS
Page
Introduction/Installation..................................... 2
Manual (single game) Mode..................................... 3
Two-Team Multiple Game Simulations............................ 4
Schedule File Simulations..................................... 5
Command Line Examples......................................... 6
Analyzing the Statistics - BASESTAT........................... 7
Maintaining teams............................................. 8
Options Switches.............................................. 8
Support....................................................... 9
Microsoft Windows notes.......................................10
Acknowledgements............................................. 10
Definition of Shareware...................................... 10
Disclaimer................................................... 11
Registration..................................................12
Target Computers:
IBM or 100% Compatible.
DOS 2.1 or later
Color monitor is best but monochrome is OK.
Hard drive and at least a 80286 is recommended for large simulations
Files included in this package:
baseball.exe - the main program
baseball.msg - the announcer's comments
baseball.doc - the file you are reading now
baseball.inf - stuff about how it all works
basestat.exe - statistics print program
old timer .dat files
sample .sch (schedule) files
Brief History:
1981 - FORTRAN for IBM VSE mainframes under ICCF
1987 - Version 1.2 Microsoft QuickBASIC 4.0
1988 - Version 1.3 Microsoft QuickBASIC 3.0
1990 - Versions 1.4 & 1.5 - a few bug fixes - flexible DH
1993 - Version 2.0 Microsoft BASIC 7.1 - major revision -
new features including large simulation capability
Page 2.
INTRODUCTION
This program has two personalities. It can be considered a game in which
one plays against another human or against the computer. It can also be
considered a simulation tool in which many games are played out rapidly
in order to discover strengths and weaknesses in a particular line-up.
This program is NOT an arcade-type game! There are no slick graphics.
But it is FUN and, to some people, addictive! It give you lots of
information on the screen and is very easy to use. A game can be played
manually in a minute or two. But the program's real strength is its
ability to simulate large numbers of games in a short time. A 162 game
schedule can be simulated in 7 minutes (on a '386 / 25 mHz) and an
entire SEASON for EVERY TEAM IN THE LEAGUE can be completed in about 45
minutes. (Slower PC's will take somewhat longer, of course).
SBS works by reading in actual statistics for every player. The program
then builds a statistical model to simulate baseball. This results is a
good approximation, especially over a large number of games. For a
typical season of 600 at-bats, about 40% of players will finish within
10 points of their actual average. About 75% will be within 20 points
and about 95% will be within 40 points.
INSTALLATION
Floppy disk PC's: no installation - just run "baseball"
Hard disk PC's: Three simple steps.
1] create a directory:
> md \sbs
2] log into the directory you just created:
> cd \sbs
3] copy the files into the directory you just created:
i.e., put source diskette in drive A [or B], then:
> copy a:*.*
Start the program by typing "baseball" at the DOS prompt. After the
"logo" screen, you are presented with a menu with three options for
play.
A) Manual or Single Game Mode
B) Two Team Multiple-Game simulations
C) Schedule File Mode for large simulations
Page 3.
A. SINGLE GAME MODE
Pick your teams from the list of .dat files. You may [V]iew or [E]dit
first if you like.** After you pick your starting pitchers, you are
asked if you want to use the DH rule and whether you want to save the
results in a statistics file. The default starting lineups are displayed
for each team. You have the opportunity to make changes in the lineup or
batting order as you see fit. The changes you make are temporary for
this game only. (The team data files on disk do not change). You then
are given the chance to alter the defensive positions for each side.
Next, you are presented with the "Ground Rules" screen. Here you decide
whether the computer will manager either, both, or none of the teams.
[For teams which are manually controlled, the player(s) use "pop-up"
command windows throughout the game that let them control their
offensive or defensive options]. You will also be asked about the "Delay
Factor". This determines how long the announcer's comments are left on
the screen and determines the speed of the simulation. Try "2" to start
out with. If this is a little too slow for you, change it to "1" later.
Finally you will see a display of the "field" with the home team
assuming their defensive positions. The scoreboard is on the upper left
and the announcer's box on the upper right. You can start the action by
hitting ENTER.
PLEASE NOTE:
If the computer is NOT managing the visiting team, the visiting team
command window is activated by hitting "S". This displays a list of
either offensive or defensive actions depending, of course, on what the
visiting team is doing.
W > Scroll through your options using the "W" and "X" keys.
> "Mark" the options (On or Off) using the "A" and "D" keys.
A S D (A=On D=Off)
> If both side are managed manually, the computer
X assumes you are playing against a buddy and will not
display the results of the "A" and "D" keys in order
to hide your decisions from your opponent.
> Move the pointer to "READY/EXIT" and hit "A" when done.
If the computer is not managing the home team, the home team command
window is activated by hitting the "5" key. (SBS attempts to turn on your
numeric-lock so you can use your numeric keypad).
8 > Scroll through your options using the "8" and "2" keys.
> "Mark" the options (On or Off) using the "4" and "6" keys.
4 5 6 (4=On 6=Off)
> If both side are managed manually, the computer
2 assumes you are playing against a buddy and will not
display the results of the "4" and "6" keys in order
to hide your decisions from your opponent.
> Move the pointer to "READY/EXIT" and hit "4" when done.
Remember, if you don't want to make a strategic move (which is most of
the time) just hit ENTER.
** [E]dit looks for a program named "edit". You may use any other text
editor by creating an ASCII file called BASEBALL.CFG containing the
line: EDITOR=your editor
Page 4.
To clarify a point about the command windows -- You have the option of
telling the computer whether or not to HIDE the decisions you make in
the command windows. (This is done just before the field is displayed).
If there is no other human present there is no reason to hide your
decisions. Not hiding makes it easier to see what's going on inside your
command window. Also if there is only one human involved, just hitting
ESC will close your command window. No need to go back to READY/EXIT.
To quit the game, hit "Q". To get the current "Box Score" hit "B".
These two commands may be used any time the main field is displayed and
a command window is not open.
If you change your mind about which teams the computer should manage,
hit "C" and the "Control Window" appears in the middle of the screen.
You can also change the Delay Factor and Sound in this window. At the
end of the game you will get a nice display of the Box Score and have
the option to play another game or to quit.
LAZY MAN'S MODE - LETTING THE COMPUTER MANAGE BOTH SIDES
(All you do is sit back and watch!)
If you pick the automatic manager for BOTH teams, you will have no input
into the game yourself...all you do is sit back and watch the game
unfold. You may hit "C" (for Control Window) to halt the action at any
time. Then you may choose to reset the "AutoManger" for either or both
teams or change the "Delay Factor". If you want to follow the action you
probably want to set the Delay at "2". If you want to play the game out
as quickly as possible, set it at "1" or even "0". With AutoManager on
"Y" for both sides and a Delay of "0" the game will be played out in a
matter of seconds.
B. TWO-TEAM MULTIPLE-GAME SIMULATIONS
The idea here is to pick two teams and let the computer simulate [at
high speed] a given number of games between them.
You select your two teams just like in Manual Mode. But the starting
pitcher selection is different. You need to select one of the "methods"
which are presented. "S5" means the computer will use a five man
rotation SEQUENTIALLY. That is the number two guy will pitcher after the
number one guy, etc. An "S4" means only a four man rotation will be
used, and so on. Using the same "S"-type rotation for each team may lead
to an undesirable effect, however. For example, if you used S5 for both
teams the same pitchers would always start against each other. You can
avoid this by picking one of the "R"-type rotations for one or both
teams. An "R5" means the computer will pick one of the five starters at
RANDOM. Of course you can also pick to have a particular pitcher start
every game. Just type in his number as shown.
After you have selected the starting rotation scheme for each team, you
are asked how many games you want to run. Then you are asked if you want
to save the statistics information in a "Statistics File". If the file
you specify already exists you have the option of adding to it or
clearing it out for this run.
Page 5.
The simulation will start with the program running as fast as it can.
(Delay factor = 0). If you want to slow it down, you can do so by
popping up the Control window and changing the Delay. You can also type
"R" during the run to check the Won-Lost results.
C. SCHEDULE FILE SIMULATIONS
Strategic Baseball Simulator now lets you do large simulations, such as
an entire team's schedule for a year or even all games for an entire
league. All the stats can be accumulated and you can later compare how
the simulation did versus the real thing. "Schedule Files" are the
vehicle through which SBS knows to play certain teams a certain number
of games.
The schedule file is just a text file you can build yourself with your
text-editor program or word processor. It contains the teams and number
of games they are to play. For example, one such schedule file might
contain the following lines:
/v:91mets.dat /h:91cards.dat /n:9
/v:91mets.dat /h:91cubs.dat /n:9
(etc. etc. through all the Eastern Division teams)
/v:91mets.dat /h:91reds.dat /n:6 /hp:S4
/v:91mets.dat /h:91braves.dat /n:6
(etc. etc. through all the Western Division teams)
The /v: means, as you probably guessed, the visiting team. And of course
the /h: means the home team. The number following the /n: determines
the number of games. You can also use the /vp: and /hp: switches to
override the default starting pitching rotation scheme which was
discussed earlier. But, at a minimum, each line in a schedule file must
contain the /H: /V: & /N: switches.
If you save statistics when you run a schedule file -- and you probably
will -- please be aware that one set of statistics files can only hold
enough data for about 1550 games. So when you build schedule files, you
probably don't want to exceed 1550 games total!
When you choose option "S" from the Menu, SBS will show you all the
schedule files in the current directory. (They must end in .SCH or they
won't be listed). Highlight the one you want to run and hit ENTER. (You
could hit "V" to view it first if desired). You will then be asked to
pick a default starting pitcher rotation scheme. This is for ALL the
teams in the schedule file. You will probably want to pick "S5" -
sequential five-man rotation - most of the time. This can be overridden
for specific teams -- see the example above -- with the /hp: and /vp:
switches inside the schedule file. You will then be asked if the DH rule
will be in effect in this run. (You can override this too inside the
schedule file with the /dh: switch. See listing of command-line options
for more details). Finally you will be asked whether or not to save the
statistics to a STATISTICS FILE. Usually when you run a large number of
games in a schedule file you are interested in how the individual
players performed, so you go ahead a specify a Statistics File.
Page 6.
The simulation will start with the program running as fast as it can.
(Delay factor = 0). If you want to slow it down, you can do so by
popping up the Control Window and changing the Delay. You can also type
"R" during the run to check the Won-Lost results.
COMMAND LINE EXAMPLES
You may never need to start SBS with "command line" options, but they
are available. They would be useful if you intended to run SBS from a
batch file. Note that you can use the same switches from either the
command line or inside a schedule file. Here are a few scenarios
showing the use of command line options.
Example 1: You want to play 12 games with the 27 Yankees visiting the 61
Yankees. You don't want the DH. You want each team to cycle through a
4-man pitching rotation. You want to save the results to a statistics
file named "styanks".
>baseball /v:27yankee /h:61yankee /sp:S4 /dh:n /st:styanks /n:12
The /V and /H switches load the visiting and home teams respectively. If
you leave off the file extension on the team files, the program assumes
.dat. The /SP switch sets both teams to use S4 -- Sequential four-man
rotation. If you omit the /SP switch the default is S5 for both teams -
a five-man rotation. /DH:N forces NO DH, although if you leave if off
the default is NO DH anyway. /ST gives the name of the statistics file
you choose. /N:12 says to play 12 games. The statistics file "styanks"
will actually be created as three separate files by SBS - styanks.sts,
styanks.stb & styanks.stp. Do NOT include a file extension on the /ST
switch.
Example 2: Same as above only we want the 27 Yanks to use a 3-man rotation.
>baseball /v:27yankee /h:61yankee /vp:S3 /hp:S4 /st:styanks /n:12
Since the pitching rotation is different for each team, we have to use
the /VP and /HP switches instead of /SP. Notice that if we don't want
the DH we don't need to specify the /DH switch.
Example 3: You want the 91 Royals to play the 91 A's 162 times, use the
DH, and save stats to a file called "stxxx". We want Bret Saberhagen to
start every game (!) for the Royals. The A's are to use their five-man
rotation.
>baseball /v:91athlet /h:91royals /hp:1 /dh:y /n:162 /st:stxxx
/HP:1 says to use the first starting pitcher listed in the .dat file.
Example 4: You want to simulate the entire 1991 season for the New York
Mets. A five-man rotation is OK for all teams. Save statistics to
"st91mets".
>baseball /sch:91mets.sch /st:st91mets
The /SCH switch specifies the name of the schedule file which must
already exist. The /ST switch will save the statistics to three DOS
files -- st91mets.sts, st91mets.stb, and st91mets.stp.
Page 7.
Statistics files are always cumulative from the command line. In other
words, each time you specify a statistics file you add to the end of it.
If you want to delete a statistics file you can do the job with DOS. For
example, if you wanted to delete the statistics file "st91mets", you
would do:
del st91mets.sts
del st91mets.stb
del st91mets.stp
at the DOS command line. (Remember there are three DOS files for each
logical statistics file). Of course you could also start the program
without command line options (normally) and the program will ask you if
you want to append-to or delete your statistics file.
ANALYZING THE STATISTICS - BASESTAT
Run a separate program called "basestat". This program will ask you to
enter the name of your STATISTICS FILE. It will then summarize the
results and print them out directly to your printer or to a .PRN file.
Outputting to a .PRN file can save you some time for large simulations.
You can view this file with any number of file viewing programs or you
can load it into your word processor or text editor if you desire. You
can also send the .PRN files to your printer at your convenience at a
later time.
┌────────────── DOS commands you should know: ────────────┐
│ │
│ Viewing a file: type "filename.ext" | more │
│ │
│ Printing a file: type "filename.ext" > LPT1 │
│ copy "filename.ext" PRN │
│ print "filename.ext" │
│ │
└─────────── (do not type the quotations marks) ─────────┘
Simulating an entire season for one team (162 games) takes about 7
minutes on a fast 386. The statistics files for such a run will total
around 250K -- easily fitting on a diskette.
If you simulate a very large number of games in one stat file, you may
need a hard disk. If you simulate an entire season for an entire league
the game count goes to 972 for the National League (pre-expansion) and
1134 for the American League. This may take a while to run -- depending
on your machine. A 386 PC should handle it in about 45 minutes. The
statistics for such a run will require close to 2 megabytes of disk
space. "Basestat" can sort files this big, but it may take several
minutes or so. THERE IS AN UPPER LIMIT ON THE SIZE OF STATISTICS FILES!
That limit is 32,766 batter records which corresponds roughly to 1550
games. Therefore when you build schedule files and save statistics, do
not exceed 1550 games in a single statistics file.
TIP: A disk-caching program helps a lot! Try a cache size of 512K if
possible. Use "write" caching if available.
Page 8.
MAINTAINING TEAMS (or build your own teams!)
You can change information on the team files or make up your own teams
using any text editor. Just about any word processor will do also, but
make SURE you save the file in plain ASCII format. This is sometimes
called DOS MODE or NON-DOCUMENT MODE or some-such thing. Make sure you
follow the exact format used in the team files supplied. Everything has
to be in its own particular column, etc. The best way is to use DOS to
copy one of the .dat files you already have and then edit the new file.
Slots 1 thru 9 are the starting lineup and batting order. If you do not
want a DH in your default starting lineup, leave slot 9 blank like I
have in my National League files.
Slots 10 thru 14 are for starting pitchers. Slots 15 thru 18 are for
relief pitchers. You've got to have NINE pitchers. No more, no less. If
you can't come up with enough pitchers try making up "generic pitchers"
like "Joe Noname". Assign him perhaps 100 Innings pitched, with 100
Hits, 30 walks and 40 strike-outs, or whatever you feel a "generic"
pitcher's record should look like. Slot 15 is reserved for the "closer"
-- the guy who comes in late in the game trying to nail down a save.
Slots 19 thru 25 are the rest of the bench. You may or may not have your
bench filled out to slot 25. If you do not include a DH in the default
starting lineup above, and then choose to use a DH in the program, the
player in slot 19 will be inserted on the fly into the number five spot
in the batting order.
A Reminder:
If you are adding your own team files, you must use the file extension
".dat" for your data file. You may have up to 300 teams in a given
subdirectory. If your team .dat files are in a different subdirectory
than the baseball.exe, you must start the program with the path switch.
For example, if your .dat files are in a subdirectory called \bbal you
would start the game with: >baseball /p:\bbal
You may also fiddle with the announcer's comments by editing the
"baseball.msg" file. Again, make sure you save the file in plain ASCII
format.
OPTION SWITCHES
This is a list of all the switches that can be set from the DOS command
line or inside a "schedule" file. You may enter as many switches as you
need. Each one must be separated by a space. Each line in a schedule
file must contain, at a minimum, the /H: /V: & /N: switches.
/P:path
If your .dat files reside in some other drive or directory other than the
one where "baseball.exe" is, you need the /P switch.
Example: >baseball /p:b: (.dat files are in drive b)
>baseball /p:\nat91 (.dat files are in the \nat91 subdirectory)
Page 9.
/H:team.dat
/V:team.dat
/DH:Y or N
/SCH:schedule file
/N:number of games
/SP:S5-S2 or R5-R2 or 1-5
Default Starting Pitcher Selection Method:
If you are simulating many games, there are different ways the computer
uses to pick the starting pitcher. If you do not specify the /SP switch
the program defaults to S5, sequential 5-man rotation. You can use a
4-man, 3- man, or even 2-man rotation if you want. If you want the
computer to pick a pitcher at random use "R" instead of "S". For example
R4 would result in the program picking a pitcher at random from the
first four listed. If you want to use the same pitcher every game --
they won't wear out in the computer -- just specify the number of the
pitcher from 1 to 5.
/VP: (same as SP) Override /SP for the Visiting Team entered in /V
/HP: (same as SP) Override /SP for the Home Team entered in /H
/S:Y or N Turns Sound Effects On or Off
/C:C or M Force Color or Monochrome display. The program is usually
smart enough to figure this out without relying on this switch.
/ST:statistics file
Saving Statistics:
This file name may be 1 to 8 characters long. Do NOT use a file
extension. Strategic Baseball will create three stat files: 1) A summary
file with the extension .sts 2) a batter's file with the extension
.stb 3) a pitcher's file with the extension .stp. If you specify a
stat file that already exists, the stats from this run will be added to
the end of the file. If you want to erase a stat file and start over
again, use DOS commands to erase the three different file extensions
described above.
/DEL:delay factor 0-9 How long (in seconds) you get to read the
play-by-play
SUPPORT
The author appreciates feedback from users and will reply to written
requests to the address below. Feel free to distribute the program in
its original format. Please do not distribute team .DAT files except
for the old-timer teams.
Contributions are welcome. For $9.95, I will supply a diskette with
data files for all American League and National League teams containing
the PREVIOUS year's statistics. Also included will be the latest version
of the program. The previous year's data diskettes should be available
each year around April 1. For example, if it is now May 1994, the rosters
and data for the 1993 teams should be available. They will reflect the
rosters at the end of the 1993 season and will not include trades and/or
new players which have occurred since the end of that season. You will
Page 10.
have to use your text editor or word processor and update the files
yourself if you want to have current rosters with last year's data.
Here's the address:
D.B. Schmidt
R.R. 4 - Box 142
St. Joseph, Missouri 64507
If this doesn't match the address on the opening screen of SBS, then
suspect tampering.
MICROSOFT WINDOWS
If you have a '386 or better, it can be very nice to run a long SBS
simulation in the "background" under Windows. If you are familiar with
Windows you can create a .PIF file that allows the application to run in
the "background" while you run other programs. I used the default .PIF
included with Windows and checked the Background box. I also cleared the
"Detect Idle Time" box. The program seems to run fine most of the time
but occasionally "freezes" when switching back and forth between running
in a window and running full-screen (ALT+ENTER). The problems seems only
to occur during SBS's "manual" mode. It appears that SBS's "delay"
routine is somehow confusing Window's time-slicing scheme.
Recommendation: If playing in "Manual Mode" stay in "full-screen"!
ACKNOWLEDGEMENTS
Microsoft's QuickBASIC team.
Thomas Hanlin III for his excellent ADVBAS routines. Highly recommended.
SBS makes good use of some of these routines.
Ethan Winer for his superb book "BASIC Techniques". A modified version
of his file sorting program is used in "basestat".
Special thanks to Mr. Tom Riggs of Longview, Texas who researched many
of the old-timer teams on this disk. And to Mr. Robert Logbeck of St.
Joseph, Missouri for help in debugging, research and building schedule
files.
DEFINITION OF SHAREWARE
Shareware distribution gives users a chance to try software before
buying it. If you try a Shareware program and continue using it, you are
expected to register. Individual programs differ on details -- some
request registration while others require it, some specify a maximum
trial period. With registration, you get anything from the simple right
to continue using the software to an updated program with printed
manual.
Copyright laws apply to both Shareware and commercial software, and the
copyright holder retains all rights, with a few specific exceptions as
stated below. Shareware authors are accomplished programmers, just like
commercial authors, and the programs are of comparable quality. (In both
Page 11.
cases, there are good programs and bad ones!) The main difference is in
the method of distribution. The author specifically grants the right to
copy and distribute the software, either to all and sundry or to a
specific group. For example, some authors require written permission
before a commercial disk vendor may copy their Shareware.
Shareware is a distribution method, not a type of software. You should
find software that suits your needs and pocketbook, whether it's
commercial or Shareware. The Shareware system makes fitting your needs
easier, because you can try before you buy.
And because the overhead is low, prices are low also. Shareware has the
ultimate money-back guarantee -- if you don't use the product, you don't
pay for it.
DISCLAIMER - AGREEMENT
Users of Strategic Baseball Simulator must accept this disclaimer of
warranty: "Strategic Baseball Simulator is supplied as is. The author
disclaims all warranties, expressed or implied, including, without
limitation, the warranties of merchantability and of fitness for any
purpose. The author assumes no liability for damages, direct or conse-
quential, which may result from the use of Strategic Baseball
Simulator."
Strategic Baseball Simulator is a "shareware program" and is provided at
no charge to the user for evaluation. Feel free to share it with your
friends, but please do not give it away altered or as part of another
system. The essence of "user-supported" software is to provide personal
computer users with quality software without high prices, and yet to
provide incentive for programmers to continue to develop new products.
If you find this program useful and find that you are using Strategic
Baseball Simulator and continue to use Strategic Baseball Simulator
after a reasonable trial period, you must make a registration payment
of $9.95 to the author. The $9.95 registration fee will license one
copy for use on any one computer at any one time. You must treat this
software just like a book. An example is that this software may be used
by any number of people and may be freely moved from one computer
location to another, so long as there is no possibility of it being used
at one location while it's being used at another. Just as a book cannot
be read by two different persons at the same time.
You are encouraged to pass a copy of Strategic Baseball Simulator along
to your friends for evaluation. Please encourage them to register their
copy if they find that they can use it. All registered users will
receive a copy of the latest version of the Strategic Baseball Simulator
system.
Page 12.
Print this file (baseball.doc) and tear off the following registration
form. You can print this file from DOS by doing: type baseball.doc > lpt1
-------------------------------------------------------------------------
Mail To:
D.B. Schmidt
R.R. 4 - Box 142
St. Joseph, Missouri 64507
Name : _________________________________________
Address: _________________________________________
City : _____________________________ State: ____
Zip : _______________
Do you want a 5.25" or 3.5" diskette? ____________
[Please select 3.5" if at all possible!]
If you absolutely require a 5.25", is High Density (1.2 meg) OK? ___
Just to satisfy my curiosity, describe your computer system:
____________________________________________________________
Enclosed is my check for $9.95.
Thanks.